Simulation Details

Physical (creature's body) simulation

Bodies of creatures are divided into small pieces (at sticks' ends) being in fact ideal material points. This approach is called 'finite element method': not every point of material body is simulated - only a finite number of points, representing small volumes in the body. The simulator calculates all the forces affecting a given point: gravity, elastic reaction when connected to other points, ground reaction and friction when touching the ground, etc.
In our model some assumptions are taken to simplify calculations. It uses very primitive but fast numeric integration method, so the results are not so exact when dealing with big forces.
The picture on the right shows sample forces calculated in Framsticks physical simulator:
  • RED: gravity force
  • PURPLE: friction
  • GREEN: elastic reaction of stick joints
  • CYAN: damping inside sticks
  • BLUE: ground reaction

Neuron Net (creature's brain) simulation

Framsticks neurons use simple weighted sum of input signals. Excitation influences neuron state, which has some inertia. Stronger signals can change the state faster than weak signals. Output is flattened to -1...+1 range using basic sigmoidal function. See examples below: (input/state/output)
Simple excitation. The state goes up when the input is positive and falls down when the input reaches zero. Note that in this example the neuron's state can fall below zero due to its inertia.
Short but strong impulse gives similar results to weak and long one.
In this example a strong signal causes saturation of the neuron (its state goes very high). Later signal changes do not influence the output.
Neuron properties can be changed by some special genotype elements inside neuron descriptions. Each neuron has 3 parameters: Force and Inertia influence changes of the inner neuron state. In each simulation step, the neuron state is modified towards the value calculated from input excitations. Force determines how fast the value is changed. Maximum value of 1.0 gives instant reaction. Low values, like the default (0.04) cause smooth 'charging' and 'discharging' of the neuron. A Neuron's inertia is similar to the physical inertia of a body: it sustains its state change tendency. Low Inertia values have very little influence on the state. Values near the maximum (1.0) can result in oscillations of the neuron state.

Examples: (input/state/output)
Force=0.1, Inertia=0: Slow state change. Note the instant reaction after the input signal pulse when inertia is disabled.
Force=0.1, Inertia=0.8: With inertia enabled, neuron's state raises above input pulse amplitude, and then drops below zero. Final state is achieved after several oscillations.
Force=1, Inertia=0: Maximum force coefficient results in an instant input to output propagation.

Sigmoid coefficient changes the output function.
The following formula is used: Output = 2/(1+exp(Sigmoid * State))-1

Examples:
Sigmoid=2.0 (default)
Sigmoid=10.0 (high values of sigmoid produce nearly a threshold function)
Sigmoid=0.5 (low value gives nearly linear output function)